<img src="<?=base_url()?>img/header.png" id="logo_image" alt="Logo"/>
<div class="preview form_section">

<div class="left">
<h1>Hello <?=$name?> (<?=$login?>)</h1>
<div class="subtitle">Your current role is '<?=$role?>'</div>


<div id="success_area" class="preview centered">
<?if($response != ""):?>
    <div class="subtitle success"><?=$response?></div>
<?endif;?>
</div>

</div>
<div class="right no_tb_margin">
    <div class="meal_preview stats">
    <h1>Meal Orders Status</h1>
    <ul>
        <?if ($ordering == 1)://Meals are orderable?>
        <li><?=$order?></li>
        <li><?=$vote?></li>
        <?elseif ($ordering == 0): //No meals to be ordered?>
        <li class="warning">No meals today</li>
        <?else: //Ordering is turned off ?>
        <li class="warning">Ordering meals is disabled</li>
        <?endif;?>
    </ul>
    </div>
</div>
<br style="clear:both"/>
</div>
<div class="left">
<div class="form_section no_tb_margin">
    <div class="preview" style="text-align:center; border-bottom: 1px solid #bacbec ">
    <h1>Quick Links</h1>
</div>
    <a class="button largeButton no_tb_margin" href="<?=base_url()."current_orders/orders"?>">Orders</a>
<br/>
<a class="button largeButton no_tb_margin" href="<?=base_url()."current_orders/popular"?>">Votes</a>
<br/>
<a class="button largeButton no_tb_margin" href="<?=base_url()."stats/shopping_list"?>">Shopping List</a>
<br/>
</div>
<div class="form_section"">
<a class="buttonLight largeButton no_tb_margin" href="<?=base_url()."home/logout"?>">Log out</a>
</div>
</div>
<div class="right form_section no_tb_margin">
    <div class="meal_preview">
    <h1>Tonight's Meals:</h1>
    <ul>
        <?if ($tonight->num_rows()):?>
            <?foreach($tonight->result() as $result):?>
            <li><?=$result->meal_title?></li>
            <?endforeach;?>
        <?else:?>
            <li class="warning">Warning: No meals allocated</li>
        <?endif;?>
    </ul>
    </div>
    <div class="meal_preview">
    <h1>Tomorrow's Meals:</h1>
    <ul>
        <?if ($tomorrow->num_rows()):?>
            <?foreach($tomorrow->result() as $result):?>
            <li><?=$result->meal_title?></li>
            <?endforeach;?>
        <?else:?>
            <li class="warning">Warning: No meals allocated</li>
        <?endif;?>
    </ul>
    </div>
</div>
<br style="clear:both"/>